package com.ruoyi.yf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yf.mapper.YfDeptNurseMapper;
import com.ruoyi.yf.domain.YfDeptNurse;
import com.ruoyi.yf.service.IYfDeptNurseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 科室护士Service业务层处理
 * 
 * @author XiaoYi...
 * @date 2020-07-06
 */
@Service
public class YfDeptNurseServiceImpl implements IYfDeptNurseService 
{
    @Autowired
    private YfDeptNurseMapper yfDeptNurseMapper;

    /**
     * 查询科室护士
     * 
     * @param nurseId 科室护士ID
     * @return 科室护士
     */
    @Override
    public YfDeptNurse selectYfDeptNurseById(String nurseId)
    {
        return yfDeptNurseMapper.selectYfDeptNurseById(nurseId);
    }

    /**
     * 查询科室护士列表
     * 
     * @param yfDeptNurse 科室护士
     * @return 科室护士
     */
    @Override
    public List<YfDeptNurse> selectYfDeptNurseList(YfDeptNurse yfDeptNurse)
    {
        return yfDeptNurseMapper.selectYfDeptNurseList(yfDeptNurse);
    }

    /**
     * 新增科室护士
     * 
     * @param yfDeptNurse 科室护士
     * @return 结果
     */
    @Override
    public int insertYfDeptNurse(YfDeptNurse yfDeptNurse)
    {
        yfDeptNurse.setCreateTime(DateUtils.getNowDate());
        return yfDeptNurseMapper.insertYfDeptNurse(yfDeptNurse);
    }

    /**
     * 修改科室护士
     * 
     * @param yfDeptNurse 科室护士
     * @return 结果
     */
    @Override
    public int updateYfDeptNurse(YfDeptNurse yfDeptNurse)
    {
        yfDeptNurse.setUpdateTime(DateUtils.getNowDate());
        return yfDeptNurseMapper.updateYfDeptNurse(yfDeptNurse);
    }

    /**
     * 删除科室护士对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYfDeptNurseByIds(String ids)
    {
        return yfDeptNurseMapper.deleteYfDeptNurseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除科室护士信息
     * 
     * @param nurseId 科室护士ID
     * @return 结果
     */
    @Override
    public int deleteYfDeptNurseById(String nurseId)
    {
        return yfDeptNurseMapper.deleteYfDeptNurseById(nurseId);
    }
}
